package com.starry.module.system.core.logger.feign;

import com.starry.core.common.domain.R;
import com.starry.core.web.core.controller.BaseController;
import com.starry.module.system.api.logger.SysLogOperationApi;
import com.starry.module.system.api.logger.domain.qo.SysLogOperationQo;
import com.starry.module.system.core.logger.service.SysLogOperationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * RPC-操作日志
 *
 * @author xiaoke
 */
@Tag(name = "RPC-操作日志")
@RestController
public class SysLogOperationApiImpl extends BaseController implements SysLogOperationApi {

    private final SysLogOperationService sysLogOperationService;

    public SysLogOperationApiImpl(SysLogOperationService sysLogOperationService) {
        this.sysLogOperationService = sysLogOperationService;
    }

    @Operation(summary = "RPC-操作日志-新增")
    @Override
    @PostMapping(CREATE)
    public R<Long> save(SysLogOperationQo qo) {
        return success(sysLogOperationService.save(qo));
    }
}
